home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / mail-tools / thor / thor_2.22 / thor.lha / rexx / BBSRead / ClearFileDataBase.br < prev    next >
Text File  |  1995-12-18  |  801b  |  48 lines

  1. /* ClearFileDataBase.br
  2.  *
  3.  * Delete all fileareas on a bbs.
  4.  *
  5.  * Script by: Eivind Nordseth, Ultima Thule Software.
  6.  */
  7.  
  8.     parse arg argument
  9.  
  10.     if(argument = '') then
  11.     do
  12.         say '$VER: ClearFileDataBase.br V3.1 (04.09.94)'
  13.         say 'Template: BBSNAME/A'
  14.         exit
  15.     end
  16.  
  17.     if ~show('p', 'BBSREAD') then do
  18.         address command
  19.             "run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
  20.             "WaitForPort BBSREAD"
  21.     end
  22.  
  23.     address BBSREAD
  24.  
  25.     GETFAREALIST stem FAREALIST argument
  26.     if(rc ~= 0) then 
  27.     do
  28.         say BBSREAD.LASTERROR
  29.         exit
  30.     end
  31.  
  32.     do i=1 to FAREALIST.COUNT
  33.         say 'Deleting file area:' FAREALIST.i
  34.         CONFIGFAREA argument '"'||FAREALIST.i||'"' DELETEFAREA
  35.         if(rc ~= 0) then 
  36.         do
  37.             say BBSREAD.LASTERROR
  38.             exit
  39.         end
  40.     end
  41.  
  42.     PACKDATAFILE argument FILEDATA
  43.     if(rc ~= 0) then 
  44.     do
  45.         say BBSREAD.LASTERROR
  46.         exit
  47.     end
  48.